<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>

<form id="form_disciplina"  name="form_disciplina" action="<?php echo url_for('disciplina/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_disciplina='.$form->getObject()->getIdDisciplina() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<input type="hidden" name="id_disciplina" value="<?php echo $form->getObject()->getIdDisciplina() ?>" />
<?php endif; ?>
	<?php echo $form->renderHiddenFields() ?>
  <table class="form">
    <tbody>
      <tr><th colspan="2" class="title">Dados disciplina</th></tr>
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['nm_disciplina']->renderLabel() ?></th>
        <td>
          <?php echo $form['nm_disciplina'] ?>
          <?php echo form_error('disciplina[nm_disciplina]'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['ds_disciplina']->renderLabel() ?></th>
        <td>
          <?php echo $form['ds_disciplina'] ?>
          <?php echo form_error('disciplina[ds_disciplina]'); ?>
        </td>
      </tr>
    </tbody>
  </table>



<?php
	comandos_form(
		link_to(
			':: Voltar ::',
			$sf_context->getModuleName().'/list',
			array('class' => 'btn btn-info')
		),
		submit_tag(':: Salvar ::')
	);
?>
</form>


<script>
    $(function()
        {
            System.formdata.save(new Array("msgAlerta", "Atenção:"));
        }
    );
</script>